<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 11px;
}
-->
</style></head>

<body> 
<div align="center" class="style1">
  <?
require("dbecrm.php"); 
if($_POST['control']==1){

$qry="INSERT INTO dbo.app_NotesUsuariosWeb
                      (id_UsuarioWeb,st_Asunto,st_Notes)
VALUES     (".$_POST['id_UsuarioWeb'].",'".$_POST['asunto']."','".$_POST['notes']."')";
$rqry=mssql_query($qry);

?>
  <script>
alert('Se agrego con exito la nota')
window.close
</script> 
  Agregar otra nota
  <? 

} ?>
</div>
<form id="form1" name="form1" method="post" action="global_Notes.php">
<table width="100%" border="0">
  <tr>
    <td width="41%">
     
        <div align="right">
          <input name="id_UsuarioWeb" type="hidden" id="id_UsuarioWeb" value="<?=$_GET['iduser'] ?>" />
          <input name="control" type="hidden" id="control" value="1" />
      Asunto</div></td>
    <td width="56%"><input type="text" name="asunto" id="asunto" /></td>
    <td width="3%">&nbsp;</td>
  </tr>
  <tr>
    <td><div align="right">Comentarios</div></td>
    <td><textarea name="notes" id="notes" cols="45" rows="5"></textarea>
      </td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="button" id="button" value="insertar" /></td>
    <td>&nbsp;</td>
  </tr>
</table> 
</form>

</body>
</html>
